<?php
/**
 * Created by PhpStorm.
 * User: zhongyb
 * Date: 2016/6/6
 * Time: 11:30
 */
namespace common\repositories\common;

use common\repositories\BaseRepository;
use common\entities\common\MyscrmErpauthenticationinfoEntity;
use common\support\StringHelper;
use Yii;

class MyscrmErpauthenticationinfoRepository extends BaseRepository {

    /**
     * 记录是否存在
     * @param string $authName
     * @param string $orgId
     * @return bool
     */
    public function isExists($authName, $orgId)
    {
        return MyscrmErpauthenticationinfoEntity::find()
            ->where(['AuthName' => $authName, 'OrganizationId' => $orgId])
            ->exists();
    }

}